package com.ez.supervise.dao.impl;

import java.util.List;

import com.ez.supervise.core.Page;
import com.ez.supervise.dao.DemocracyScoreDao;
import com.ez.supervise.dao.base.BaseDaoImpl;
import com.ez.supervise.model.biz.DemocracyScore;

public class DemocracyScoreDaoImpl extends BaseDaoImpl implements DemocracyScoreDao {

    public void insert(Object democracyscore) {
	sqlMapClientTemplate.insert("biz.insertDemocracyScore", democracyscore);
    }

    public Object get(Long id) {
	return (DemocracyScore) sqlMapClientTemplate.queryForObject("biz.getDemocracyScoreById", id);
    }

    public void update(Object org) {
	sqlMapClientTemplate.update("biz.updateDemocracyScore", org);
    }

    public void delete(Long id) {
	sqlMapClientTemplate.update("biz.deleteDemocracyScore", id);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyScoreDao#findByCount(com.ez.supervise.core.Page)
     */
    public int findByCount(Page page) {
	return (Integer) getSqlMapClientTemplate().queryForObject("biz.findDemocracyScoreByCount", page);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyScoreDao#findByPage(com.ez.supervise.core.Page)
     */
    public List findByPage(Page page) {
	return getSqlMapClientTemplate().queryForList("biz.findDemocracyScoreByPage", page);
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.ez.supervise.dao.DemocracyScoreDao#findAll()
     */
    public List findAll() {
	return getSqlMapClientTemplate().queryForList("biz.findAllDemocracyScore");
    }

}
